﻿using System.Collections.Generic;
using Dsl.Ped.AddIn.Beeps.Generated;

namespace Dsl.Ped.AddIn.Beeps.Helpers
{
    /// <summary>
    /// Helper methods of the collection of <see cref="BeepsBeep"/>
    /// </summary>
    public static class MembersHelper
    {
        /// <summary>
        /// Convert the collection of <see cref="BeepsBeep"/> object to the plain text
        /// </summary>
        /// <param name="members">Collection of <see cref="BeepsBeep"/> objects to be converted</param>
        /// <param name="tabs">Number of tabs indention</param>
        /// <returns>Collection of <see cref="BeepsBeep"/> objects converted to the plain text</returns>
        public static string ToPlainText(this IEnumerable<BeepsBeep> members, int tabs)
        {
            var str = "";
            foreach (var member in members)
            {
                str += (member).ToPlainText(tabs);
            }

            return str;
        }
    }
}
